.TH E1432_SET_AVG_NUMBER 3 E1432
.SH NAME
.nf
e1432_set_avg_number \- Set average number
e1432_get_avg_number \- Get average number
.fi
.IX e1432_set_avg_number(3) 3
.IX e1432_get_avg_number(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_avg_number(E1432ID hw, SHORTSIZ16 ID,
                               SHORTSIZ16 number)
SHORTSIZ16 e1432_get_avg_number(E1432ID hw, SHORTSIZ16 ID,
                               SHORTSIZ16 *number)
.cE
.SH DESCRIPTION
\fIe1432_set_avg_number\fR sets the number of scans of data to be averaged.
At this time
averaging is only allowed on the frequency data that results from the FFT 
calculations which are turned on using \fIe1432_set_calc_data\fR 
with the \fBE1432_DATA_FREQ\fR parameter.  Averaging allows the data 
from multiple 
scans to be averaged together before being uploaded to the host computer.
This method both reduces noise on the data and reduces the amount of data
uploaded to the host.  Setting the average number to zero allows continuous
averaging until the measurement is stopped.  The averaging method is set with 
the \fIe1432_set_avg_mode\fR function.  The rate at with intermediate results 
in an average are sent to the host is controlled by \fIe1432_set_avg_update\fR.

Although averaging is performed only on frequency data, it is still
possible to read time data out of the module when averaging is taking
place.  Whenever frequency data is made available to the host (as
controlled by \fIe1432_set_avg_update\fR), time data is also made
available.  The time data is not averaged, it is just the most recent
time block (the block corresponding to the last frequency block that
was averaged into the average results).

\fIe1432_get_avg_number\fR returns the average number.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fInumber\fR selects the total number of scans in the average.

\fBNOTE:  the number of the averaged frequency data points for the sum of squares 
modes
are one half that of the un-averaged and E1432_AVG_LIN modes, since the real
and imaginary components are combined to form a single magnitude number.  Instead 
of BLOCKSIZE points, the magnitude squared numbers will only have BLOCKSIZE/2 
points.\fR
.SH "RESET VALUE"
After a reset, \fInumber\fR is set to \fB10\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_avg_mode, e1432_set_avg_update, e1432_set_avg_weight, 
e1432_set_calc_data
.ad
